
import {
    Component, Vue,
} from 'vue-property-decorator';

import ModelShow from './business/ModelShow';

@Component
export default class HomeViewModel extends Vue {
    private container: any;
    private runMenuShow: boolean = false;
    private show: ModelShow | undefined;
    private imageindex: number = 0;
    private images: string[] = new Array();

    private mounted() {
        this.container = document.getElementById('home');
        console.log('three vue ini');
        this.show = new ModelShow(this.container);
        this.images.push('./images/ex_tx_Norm.png');
        this.images.push('./images/ex_tx_C.png');
    }

    private OnChange() {
        if (this.show) {
            if (this.imageindex === this.images.length) {
                this.imageindex = 0;
            }
            this.show.ChangeImage(this.images[this.imageindex]);
            this.imageindex++;
        }
    }
}
